#include <bits/stdc++.h>
using namespace std;
int N, K, M;
const int maxn = 11;
typedef long long ll;
ll d[maxn][maxn*maxn][350];
vector<pair<int, int> > S;

inline bool legal(int s){
    return ((s<<1)&s)==0;
}

inline bool legal(int s, int ss){
    return (s&ss)==0 && ((s<<1)&ss)==0 && ((s>>1)&ss)==0;
}

void dfs(int i, int n, int s){
    if(n > M) return;
    for (int j = i+1; j <= N; ++j) {
        int ss = s|(1<<(j-1));
        if(legal(ss)) S.emplace_back(ss, n+1);
        dfs(j, n+1, ss);
    }
}


int main() {
    ios::sync_with_stdio(false);cin.tie(nullptr);
    cin >> N >> K;
    M = (N+1)/2;

    dfs(0, 0, 0);

    S.emplace_back(0, 0);
    for(auto s:S) d[1][s.second][s.first] = 1;

    ll ans = 0;
    for (int r = 2; r <= N; ++r) {
        for(auto it:S){
            int s = it.first, c = it.second;
            for(auto itt:S){
                int s2 = itt.first, c2 = itt.second;
                if(!legal(s, s2)) continue;
                for (int i = c; i <= K-c2; ++i) if(d[r-1][i][s]){
                    d[r][i+c2][s2] += d[r-1][i][s];
                }
            }
        }
    }

    for(auto it:d[N][K]) ans += it;
    cout << ans;
    return 0;
}